<!--#Include File="LoginCheck.asp"-->
<!--#Include File="Conn.asp"-->



<script>

	function ToEscape()
	{
		$('input[name=mailSubject]').val(escape($('input[name=mailSubject1]').val()));
		$('input[name=mailBody]').val(escape($('textarea[name=mailBody1]').val()));
		myform2.action = 'http://www.rainbow6.cn/suuntomail.asp';
		//myform2.submit(); 
	}

</script>


<%
	if Request("mail") <> "" Then
		set cmdObject = Server.CreateObject("ADODB.Command")
		Set rs = Server.CreateObject("Adodb.RecordSet")
		rs.CursorLocation = 3
		rs.open "GetMailConfigInfo" ,Conn,1,1
		%>
        <div style="margin:10px; line-height:150%;">
            <form name="myform2" method="post" target="bottomFrame">
            TO: <%=Request("mail")%><br /><br />
            标题：<input type="text"  name="mailSubject1" value="" size="50" /><br /><br />

            <textarea cols="70" rows="14" wrap="hard" name="mailBody1" id="mailBody1"></textarea><br />
            
            <input type="hidden"  name="mailSubject" value=""/>
            <input type="hidden"  name="mailBody" value=""/>
            <input type="hidden"  name="mailTo" value="<%=Request("mail")%>" />
            <input type="hidden"  name="mailSmtp" value="<%=rs("mailSmtp")%>" />
            <input type="hidden"  name="mailAccount"value="<%=rs("mailAccount")%>"  />
            <input type="hidden"  name="mailPass" value="<%=escape(rs("mailPassword"))%>" />
            <input type="hidden" name="mailFrom" value="<%=rs("mailFrom")%>" />
            <input type="hidden" name="mailCharset"  value="<%=rs("mailCharset")%>"  />    
            <input type="hidden" name="flag" value="1" />
            <input type="submit" value="发送邮件" onclick="javascript:ToEscape();" class="button" />
            </form>
        <iframe name="bottomFrame" width="200" height="20" frameborder="0" scrolling="no" ></iframe>
        </div>
        
        <%		
	
	Else
		Response.Write("Error")
		Response.End()
	End If
%>
